package com.hlbspringcloud.contentcenter.controller.content;

import com.hlbspringcloud.contentcenter.domain.dto.content.ShareAuditDTO;
import com.hlbspringcloud.contentcenter.domain.entity.content.Share;
import com.hlbspringcloud.contentcenter.service.content.ShareService;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description:
 * @PROJECT_NAME: spring-cloud-alibaba
 * @CLASS_NAME:
 * @Author: huanglibin
 * @Date: 2020-06-04 23:38
 * @Version: 1.0
 */
@RestController
@RequestMapping("/admin/shares")
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class ShareAdminController {

    private final ShareService shareService;

    @PutMapping("/audit/{id}")
    public Share auditById(@PathVariable Integer id,@RequestBody ShareAuditDTO auditDTO){
        //TODO 认证、授权
        return this.shareService.auditById(id,auditDTO);
    }
}
